package com.bobi.tfca.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.bobi.tfca.model.entity.GroupEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

/**
 * 群持久层
 * @author 李文发
 * @date 2024/4/3
 */
@Mapper
public interface GroupDao extends BaseMapper<GroupEntity> {

    @Update("UPDATE `bobi_group` SET group_num = group_num + #{num} WHERE group_id = #{groupId}")
    void incrementGroupNum(@Param("groupId") Integer groupId, @Param("num") int num);
}
